<% gcp_project_id = "#{external_attribute(pwd, 'gcp_project_id', doc_generation)}" -%>
<% http_health_check = grab_attributes(pwd)['http_health_check'] -%>
describe google_compute_http_health_check(project: <%= doc_generation ? "#{gcp_project_id}" : "gcp_project_id" -%>, name: <%= doc_generation ? "'#{http_health_check['name']}'" : "http_health_check['name']" -%>) do
  it { should exist }
  its('timeout_sec') { should eq <%= doc_generation ? "'#{http_health_check['timeout_sec']}'" : "http_health_check['timeout_sec']" -%> }
  its('request_path') { should eq <%= doc_generation ? "'#{http_health_check['request_path']}'" : "http_health_check['request_path']" -%> }
  its('check_interval_sec') { should eq <%= doc_generation ? "'#{http_health_check['check_interval_sec']}'" : "http_health_check['check_interval_sec']" -%> }
end

describe google_compute_http_health_check(project: <%= doc_generation ? "#{gcp_project_id}" : "gcp_project_id" -%>, name: 'nonexistent') do
  it { should_not exist }
end